<?php
class Inasistencia extends AppModel {
	var $name = 'Inasistencia';
	var $useTable = 'inasistencias';
	var $validate = array(
		'id' => array(
			'blank' => array(
				'rule' => array('blank'),
				'on' => 'create' 
			)
		),
		'clase_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
		'persona_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		)
	);

	var $belongsTo = array(
		'Clase' => array(
			'className' => 'Clase',
			'foreignKey' => 'clase_id'
		),
		'Persona' => array(
			'className' => 'Persona',
			'foreignKey' => 'persona_id'
		)
	);
}
?>